namespace Digitalmes.Domain.Entities.Mes.Reworks;

/// <summary>
/// 产品返工过程明细。
/// </summary>
/// <remarks>在离线返工时记录。</remarks>
[SugarTable("rework_detail")]
public sealed class ReworkDetail : EntityBase
{
    /// <summary>
    /// 关联的返工单 Id。
    /// </summary>
    public long ReworkId { get; set; }

    /// <summary>
    /// 步骤编号（用于记录步骤的顺序）
    /// </summary>
    public int StepNo { get; set; }

    /// <summary>
    /// 步骤名称
    /// </summary>
    public string? StepName { get; set; }

    /// <summary>
    /// 当前步骤的执行时间。
    /// </summary>
    public DateTime ReworkTime { get; set; }

    /// <summary>
    /// 补充说明。
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 过程数据。
    /// </summary>
    [Navigate(NavigateType.OneToMany, nameof(ReworkDetailData.ReworkDetailId))]
    public List<ReworkDetailData>? Data { get; set; }
}
